//
//  LSAppDelegate.h
//  LibraryStorm
//
//  Created by Enel@Lightning on 3/21/14.
//  Copyright (c) 2014 3ATeam. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Constants.h"

@interface LSAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) FBSession *fbSession;
@property (strong, nonatomic) NSURL *createCssRule;
@property (strong, nonatomic) NSDictionary *generalSetting;

#pragma mark - Decode Object
- (id)decodeObject:(NSDictionary *)dictionary key:(NSString *)key;
- (int)decodeInt:(NSDictionary *)dictionary key:(NSString *)key;
- (double)decodeDouble:(NSDictionary *)dictionary key:(NSString *)key;
- (float)decodeFloat:(NSDictionary *)dictionary key:(NSString *)key;
- (BOOL)decodeBool:(NSDictionary *)dictionary key:(NSString *)key;
- (NSString *)decodeString:(NSString *)source;
- (NSString *)decodeString:(NSDictionary *)dictionary key:(NSString *)key;
- (NSDate *)decodeDateObject:(NSDictionary *)dictionary key:(NSString *)key;
- (NSNumber *)decodeIdStr:(NSDictionary *)dictionary key:(NSString *)key;
#pragma mark - Date Formatter
- (NSDateFormatter *)dateFormatter;
- (NSDateFormatter *)customDateFormatter;
#pragma mark - Application's Documents directory
- (NSURL *)applicationDocumentsDirectory;

#pragma mark - Setting For Epub
- (void)setGeneralSettingForEpub:(NSDictionary *)generalSetting;
- (NSString *)fontFamilyNameWithType:(FontFaceStyle)style;

#pragma mark - Limit Request API
- (BOOL)limitRequestForDay;
- (void)increaseCountOfRequestForDay;
@end
